﻿
using System.Web.Mvc;

namespace EasyLift.TMS.Web.Models
{

    public class VehicleViewModel
    {
        public Vehicle Vehicle { get; set; }
        public SelectList MissionStatus { get; private set; }
        public SelectList QCStatus { get; private set; }

        public VehicleViewModel(Vehicle vehicle)
        {
            Vehicle = vehicle;

             VehicleMissionStatusRepository missionStatusRepository = new  VehicleMissionStatusRepository();
            var statsSet = missionStatusRepository.GetAllData();
            MissionStatus = new SelectList(statsSet, " VehicleMissionStatusCode", " VehicleMissionStatusDescription",  Vehicle. VehicleMissionStatusCode);

            VehicleQCStatusRepository gcStatusRepository = new VehicleQCStatusRepository();
            var hrstatsSet = gcStatusRepository.GetAllData();
            QCStatus = new SelectList(hrstatsSet, " VehicleQCStatusCode", " VehicleQCStatusDescription",  Vehicle.VehicleQCStatusCode);
        }
    }
}